<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" href="{site}/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="{site}/favicon.ico" type="image/x-icon">
<link rel="bookmark" href="{site}/favicon.ico" type="image/x-icon">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人中心</title>
<link rel="stylesheet" href="{site}/Public/resources/css/style.css" type="text/css" media="screen" />
<script language=javascript>
	function showimage(idimg)
	{
		document.images.showimages.src="{site}/Public/pic/"+idimg.options[idimg.selectedIndex].value;
	}
</script>
</head>
<body>
<div id="body-wrapper">
  <div id="sidebar">
    <div id="sidebar-wrapper">
      <h1 id="logo">用户个人中心</h1>
      <div id="profile-links">你好，{user} | <a href="{site}">退出</a><br /><br /></div>
      <ul id="main-nav">
        <li>
          <ul>
            <li><a class="current" href="__APP__/Index{url}self{shtml}">设置个人头像</a></li>
            <li><a href="__APP__/Index{url}chpsd{shtml}">更改登录密码</a></li>
            <li><a href="__APP__/Message{url}show{shtml}">查看我的消息</a></li>
            <li><a href="__APP__/Favor{url}show{shtml}">查看我的收藏</a></li>
            <li><a href="__APP__/Index{url}mypub{shtml}">我发布的帖子</a></li>
            <li><a href="__APP__/Index{url}myrep{shtml}">我回复的帖子</a></li>
            <?php
    		if($this->is_exist_widget("SignatureWidget") && $this->is_active_widget("SignatureWidget")){
    			echo w("SignatureWidget")->slideName();
    		}
    		?>
          </ul>
        </li>
      </ul>
    </div>
  </div>
  <div id="main-content">
    <div class="content-box">
      <div class="content-box-header">
        <h3>设置头像</h3>
        <div class="clear"></div>
      </div>
      <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">
          <div class="notification attention png_bg">
            <div>用户可以选择系统推荐的头像，也可以自定义上传自己喜欢的头像。</div>
          </div>
       <form method=post action="__APP__/Index{url}saveself{shtml}">			
				<table>
					<tr>
						<td align="left">选择头像:
            <SELECT onchange="showimage(this)" size=1 name=face >
            	<OPTION value="01.gif"  selected>---男孩---</OPTION>
              <OPTION value="01.gif">01</OPTION>
              <OPTION value="02.gif">02</OPTION>
              <OPTION value="03.gif">03</OPTION>
              <OPTION value="04.gif">04</OPTION>
              <OPTION value="05.gif">05</OPTION>
              <OPTION value="06.gif">06</OPTION>
              <OPTION value="07.gif">07</OPTION>
              <OPTION value="08.gif">08</OPTION>
              <OPTION value="09.gif">09</OPTION>
              <OPTION value="10.gif">10</OPTION>
			<OPTION value="11.gif">---女孩---</OPTION>
              <OPTION value="11.gif">11</OPTION>
              <OPTION value="12.gif">12</OPTION>
              <OPTION value="13.gif">13</OPTION>
              <OPTION value="14.gif">14</OPTION>
              <OPTION value="15.gif">15</OPTION>
              <OPTION value="16.gif">16</OPTION>
              <OPTION value="17.gif">17</OPTION>
              <OPTION value="18.gif">18</OPTION>
              <OPTION value="19.gif">19</OPTION>
              <OPTION value="20.gif">20</OPTION>
              <OPTION value="21.gif">21</OPTION>
              <OPTION value="22.gif">22</OPTION>
              <OPTION value="23.gif">23</OPTION>
            </SELECT>
            <IMG id=showimages src="{site}/Public/pic/01.gif" name=showimages width="80" height="80">
           </td>
          </tr>
          <tr>
          	<td><input class="button" type="submit" value="保存"></td>
          </tr>
        </table>
      </form>
      <form method=post action="__APP__/Index{url}upload{shtml}" enctype="multipart/form-data">
        <table>
          <tr>
       		<td align="left" width="380">自定义头像</td><td align="left">
       			<a href="javascript:void(0)">
       				<img style="position:relative;" id="img" border="0" src="{site}/Public/images/set_face.png">
       			</a><span style="font-size:13px;"></span>( 最大支持120 * 120 )</span>
						<div id="imgUpload" style="position:absolute;width:67px;height:21px; top:0px;filter:alpha(opacity=0);-moz-opacity:0;opacity:0;overflow:hidden;"><input type="file" name="file"/></div>
       			<script>
       				window.onload=function(event){
       					event=event||window.event;
       					document.getElementById('imgUpload').style.top=(document.getElementById('img').offsetTop)+'px';
       					document.getElementById('imgUpload').style.left=(document.getElementById('img').offsetLeft)+'px';
       				}
       			</script>
       		</td>
       	</tr>
       	<tr>
       		<td colspan="2"><input class="button" type="submit" name="sub" value="上传"></td>
       	</tr>
         </table>
    	</form>
    <table>
    	<tr>
	   		<td>当前头像</td>
	   		<td><?php
	   		$sql="select * from ".$this->C('db_prefix') . "user where user='".$_SESSION['youyax_user']."'";
	   		$res = $this->db->query($sql);
    			$arr = $res->fetch();
	   		echo '<img src="'.$this->C('SITE').'/Public/pic/'.$arr['face'].'" border="0">';
	   		?></td>
	   	</tr>
    </table>
        </div>
      </div>
    </div>
    <include file="Tpl/Public/footer.html">
  </div>
</div>
</body>
</html>
